package com.aistar.pojo.pojoOV;

import com.aistar.pojo.Favorites;
import com.aistar.pojo.Product;

import java.util.Objects;

public class ProductFavoritsOV {

    private Product product;
    private Favorites favorites;

    public ProductFavoritsOV() {
    }

    public ProductFavoritsOV(Product product, Favorites favorites) {
        this.product = product;
        this.favorites = favorites;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public Favorites getFavorites() {
        return favorites;
    }

    public void setFavorites(Favorites favorites) {
        this.favorites = favorites;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProductFavoritsOV that = (ProductFavoritsOV) o;
        return Objects.equals(product, that.product) &&
                Objects.equals(favorites, that.favorites);
    }

    @Override
    public int hashCode() {
        return Objects.hash(product, favorites);
    }

    @Override
    public String toString() {
        return "ProductFavoritsOV{" +
                "product=" + product +
                ", favorites=" + favorites +
                '}';
    }
}
